package com.youyun56.gps.schedual;

import java.util.concurrent.LinkedBlockingQueue;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.youyun56.pojo.Car;

public class Scheduler implements Runnable {
    private GPSClaimer gpsClaimer;

    private Boolean run = true;
    private Log log = LogFactory.getLog(Scheduler.class);
    private long start;
    private LinkedBlockingQueue<Car> cars = new LinkedBlockingQueue<Car>();

    public Scheduler() {/*
                         * 
                         * GridUtils gridbean = new GridUtils(); try {
                         * gridbean.init
                         * ("select id,carMobile from car where status <> 0 ");
                         * gpsClaimer = new GPSClaimer(cars); } catch
                         * (SQLException e) { // TODO Auto-generated catch block
                         * e.printStackTrace(); } catch (UnknownHostException e)
                         * { // TODO Auto-generated catch block
                         * e.printStackTrace(); } catch (IOException e) { //
                         * TODO Auto-generated catch block e.printStackTrace();
                         * }
                         */
    }

    @Override
    public void run() {/*
                        * // TODO Auto-generated method stub
                        * while(gpsClaimer.getStatus() !=
                        * ServiceStatusType.active){ if(gpsClaimer.getStatus()
                        * == ServiceStatusType.active){ start =
                        * System.currentTimeMillis(); }else{ try {
                        * Thread.sleep(1000 * 60 * 5); } catch
                        * (InterruptedException e) { // TODO Auto-generated
                        * catch block e.printStackTrace(); log.error(e); } } }
                        */
    }

    public static void main(String[] args) {
        new Thread(new Scheduler()).start();
    }

}
